const path = require('path')

function resolve(dir) {
    return path.join(__dirname, dir)
}

module.exports = {
    configureWebpack: {
        name: 'fly-frontend',
        resolve: {
            alias: {
                '@': resolve('src')
            }
        },
        devServer: {
            proxy: {
                '/dev-api': {
                    target: 'http://10.8.4.11:8090/',
                    // 允许跨域
                    changeOrigin: true,
                    ws: true,
                    pathRewrite: {
                        '^/dev-api': ''
                    }
                }
            }
        },
    },
}